package com.zzyk.main.service.impl;

import com.zzyk.main.mapper.BankInfoMapper;
import com.zzyk.main.model.pojo.BankInfo;
import com.zzyk.main.service.BankInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BankInfoServiceImpl implements BankInfoService {
    @Resource
    private BankInfoMapper bankInfoMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return bankInfoMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(BankInfo record) {
        return bankInfoMapper.insert(record);
    }

    @Override
    public int insertSelective(BankInfo record) {
        return bankInfoMapper.insertSelective(record);
    }

    @Override
    public BankInfo selectByPrimaryKey(Integer id) {
        return bankInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(BankInfo record) {
        return bankInfoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(BankInfo record) {
        return bankInfoMapper.updateByPrimaryKey(record);
    }

    /*@Override
    @Transactional
    public void addBankInfo(BankInfo bankInfo) throws IOException {
        String fileName = fileService.fileUpload(bankInfo.getLogoFile(), logoPath);
        bankInfo.setLogo("logo"+fileName);
        bankInfoMapper.insertSelective(bankInfo);
    }*/

    @Override
    public List<BankInfo> selectAllByParam(String param) {
        return bankInfoMapper.selectLikeParam(param);
    }

}
